Skip to content

Start implementing range support for NonZero types#270

Open
timvisee wants to merge 1 commit into
Keats:masterfrom
timvisee:support-nonzero-types
Open

Start implementing range support for NonZero types#270
timvisee wants to merge 1 commit into
Keats:masterfrom
timvisee:support-nonzero-types

Conversation

@timvisee

@timvisee timvisee commented Aug 31, 2023

Copy link
Copy Markdown

Fixes #269.

Implements support for using the range validator on NonZero types from the standard library such as NonZeroU64.

This is just a start and is definitely not ready to be merged. I'm sure some important edge cases are missed. I'm not familiar with this codebase.

I'd like to know if implementing something like this is in-scope before putting more effort into it.

@Keats

Keats commented Aug 31, 2023

Copy link
Copy Markdown
Owner

Hold on, there is #262 close to being merged so it would be better to check on that branch

@timvisee

Copy link
Copy Markdown
Author

Hold on, there is #262 close to being merged so it would be better to check on that branch

Thanks for the heads up! I'll try to rebase or recreate once it's merged.

@pintariching

pintariching commented Sep 2, 2023

Copy link
Copy Markdown
Contributor

Look at the ValidateRange trait of the next branch of #262. That's where you can implement all the traits, I forgot what they're called.

@timvisee

timvisee commented Sep 4, 2023

Copy link
Copy Markdown
Author

Look at the ValidateRange trait of the next branch of #262. That's where you can implement all the traits, I forgot what they're called.

Fantastic. Much better interface to implement. I'll stall efforts on this until it is merged to prevent constant conflicts.

@Keats

Keats commented Feb 12, 2024

Copy link
Copy Markdown
Owner

Can you update the PR if you have time? I'm planning to release the changes soonish

@Keats

Keats commented Mar 4, 2024

Copy link
Copy Markdown
Owner

It's merged and released as 0.17 now

@GrantGryczan

Copy link
Copy Markdown

I know this PR needs to be updated anyway, but just for the record, it looks like this is missing NonZeroUsize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support NonZero types

4 participants